﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DotNet.Random.Email
{
    /// <summary>
    /// email后缀随机类，实现了接口IStringRandService
    /// </summary>
    public class EmailSuffixRandService : Interface.IStringRandService
    {
        /// <summary>
        /// Rands this instance.
        /// 随机生成字符串方法
        /// 映射到虚方法中，扩展时，可重写
        /// </summary>
        /// <returns>
        /// 返回字符串类型
        /// </returns>
        public virtual string Rand()
        {
            var strRand = new DotNet.Random.String.StringRandService(1, "");
            var serail = DotNet.Random.ConstUtility.EmailSuffix;
            foreach (var item in serail)
            {
                strRand.Serial.Add(item);
            }
            var res = strRand.Rand();
            return res;
        }
    }
}
